package cn.kgc.springcloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.ScopedProxyMode;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: mosin
 * @version: v1.0  2022/6/14
 */
@RestController
@RequestMapping("config")
@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)  // 不重启实现服务的刷新
public class ConfigController {

    @Value("${url}")
    private  String url;
    @RequestMapping("c1")
    public String test01(){
        return "config ok "+url;
    }

}
